home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 7
/
FM Towns Free Software Collection 7.iso
/
t_os
/
gpen32k
/
source.exe
/
LIB
/
OSRC
/
MESSAGE.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-07
|
1KB
|
72 lines
/*
message.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <EGB.H>
#include <MOS.H>
#include <Normlib.h>
#include <okome.h>
extern char work[];
#define MEX1 200
#define MEY1 140
#define MEX4 290
#define MEY4 95
#define MEX3 (MEX4-1)
#define MEY3 (MEY4-1)
#define MEX2 (MEX1+MEX3)
#define MEY2 (MEY1+MEY3)
/*
m:確認モード
1: 確認
2: 実行 取消
*/
int message(char *mess,int m)
{
int mb, mx, my, p;
p = EGB_getWritePage( 0, 0 );
EGB_writePage( work, 0 );
MOS_disp(0);
OKM_gth( MEX1,MEY1, MEX2,MEY2, 1 );
boxbf(MEX1,MEY1,MEX2,MEY2,8,15);
boxb(MEX1+2,MEY1+2,MEX2-2,MEY2-2,8);
symbol(MEX1+20,MEY1+35,mess,16,8);
for ( mb = 2-m; mb<2; mb++ )
{
boxbf(MEX2-130+60*mb,MEY2-23,MEX2-90+mb*60,MEY2-6,8,15);
}
if (m==1)
{
font12(MEX2- 63,MEY2-8,"確認",8);
} else {
font12(MEX2-123,MEY2-8,"実行",8);
font12(MEX2- 63,MEY2-8,"取消",8);
}
MOS_disp(1);
do {
MOS_rdpos(&mb,&mx,&my);
if (mb && mx>=MEX2-70 && mx<=MEX2-20 && my>=MEY2-26 && my<=MEY2-6)
{
m-= 1;
break;
}
if (mb && mx>=MEX2-130 && mx<=MEX2-80 && my>=MEY2-26 && my<=MEY2-6
&& m == 2)
{
m = 0;
break;
}
} while (1);
MOS_disp(0);
OKM_gth( MEX1,MEY1, MEX2,MEY2, 0 );
MOS_disp(1);
EGB_writePage( work, p );
mbout(&mb,&mx,&my);
return (m);
}